import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import*
testCase12="DBshop012_搜索商品流程"

firefox=openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
DBshopEnterMenu2(firefox,'商品管理','管理商品')#进入后台商品管理
firefox.find_element_by_name("goods_name").send_keys('美的')

firefox.find_element_by_xpath('//table/tbody/tr[1]/td[9]/p/button').click()
time.sleep(3)

try:
    firefox.find_element_by_link_text('商品预览').text=='商品预览'#断言
    writeLog('%s 测试成功'%testCase12 )
except:
    writeLog('%s 测试不成功'%testCase12)